<template>
	<view class="main">
		<u-sticky bg-color="#F6F6F6" @fixed="shopListTitleFixed('#FFFFFF')" @unfixed="shopListTitleFixed('#F6F6F6')" >
			<view class="shop-list-title" :style="{backgroundColor:shopListTitleBackgroundColor}">
				<view class="shop-list-title-item">
					<text>推荐商家</text>
					<view class="bottom-border"></view>
				</view>
			</view>
		</u-sticky>
		<view class="shop-info"  @click="skipPage('/pages/shop/info')" v-for="">
			<image src="/static/images/shop/logo.png" mode="" class="logo"></image>
			<view class="shop-information">
				<view class="shop-based-information">
					<text class="title bold">肯德基宅急送(万豪店)</text>
				</view>
				<view class="shop-sell-information">
					<text class="score xxs">4.6<text>分</text></text>
					<text class="quantity xxs">月销127</text>
					
					<text class="time xxs">49分钟 2.3km</text>
				</view>
				<view class="shop-lable-information">
					<text class="lable">“黄焖鸡大份也不错”</text>
				</view>
				<view class="shop-activity-information">
					<view class="activity xxs">69减3</view>
					<view class="segmentation"></view>
					<view class="activity xxs">69减3</view>
				</view>
			</view>
		</view>
		<view class="shop-info"  @click="skipPage('/pages/shop/info')" v-for="">
			<image src="/static/images/shop/logo.png" mode="" class="logo"></image>
			<view class="shop-information">
				<view class="shop-based-information">
					<text class="title bold">肯德基宅急送(万豪店)</text>
				</view>
				<view class="shop-sell-information">
					<text class="score xxs">4.6<text>分</text></text>
					<text class="quantity xxs">月销127</text>
					
					<text class="time xxs">49分钟 2.3km</text>
				</view>
				<view class="shop-lable-information">
					<text class="lable">“黄焖鸡大份也不错”</text>
				</view>
				<view class="shop-activity-information">
					<view class="activity xxs">69减3</view>
					<view class="segmentation"></view>
					<view class="activity xxs">69减3</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				shopListTitleBackgroundColor:'#F6F6F6',
			};
		},
		methods: {
			skipPage(path){
				uni.navigateTo({
				    url: path
				});
			},
			shopListTitleFixed(color){
				this.shopListTitleBackgroundColor = color;
			},
		}
	}
</script>

<style lang="less">
	.shop-list-title{
		line-height: 25px;
		font-size: 15px;
		transition-duration: 0.5s;
		flex: 1 1 0%;
		width: auto;
		font-weight: bold;
		padding-left: 2vh;
		padding-top: 2vh;
		padding-bottom: 1vh;
		.shop-list-title-item{
			display: inline-block;
			.bottom-border{
				height: 8rpx;
				background-color: #51b1fd;
				width: 30rpx;
				border-radius: 20rpx 20rpx 20rpx 20rpx;
				text-align: center;
				margin: 0 auto;
			}
			
		}
	}
	.shop-info{
		background-color: #fff;
		margin: 1vh;
		border-bottom: 1px solid #eee;
		display: flex;
		padding: 1vh;
		border-radius: 10rpx;
		
		&:last-child{
			border-bottom: none;
		}
		.logo{
			width: 10vh;
			height: 10vh;
			border-radius: 5px;
		}
		.shop-information{
			margin-left: 10px;
			flex: 1;
			.shop-based-information{
				.title{
					color: #333;
				}
			}
			.shop-sell-information{
				color:#878787;
				.score{
					color: #fe6f06;
					margin-right: 10px;
					font-weight: bold;
					text{
						margin-left: 2px;
						font-weight: 500;
					}
				}
				
				.time{
					float: right;
				}
			}
			.shop-lable-information{
				font-size: 12px;
				margin: 3px 0px 3px;
				.lable{
					background-color: #fcefde;
					color: #ec884d;
					padding: 1px 3px;
					border-radius: 5px;
				}
			}
			.shop-activity-information{
				display: inline-flex;
				font-size: 12px;
				.activity{
					color: #ff4d37;
					border: 1px solid #ff4d37;
					padding: 0px 4px;
					border-radius: 5px;
					margin-right: 5px;
				}
			}
		}
	}
</style>
